﻿using ConfExpert.Forms.Base;
using DevTeam;

using System;
namespace ConfExpert.Forms.Espresso
{
    public partial class _EspPerfA : XForm
    {
        public _EspPerfA()
        {
            InitializeComponent();
        }

        private void EspPerfA_Load(object sender, EventArgs e)
        {
            gridView1.Init("GetESPpA");
            gridView1.AddDetailGrid(gridView2, "ProductId");

            gridView1.MakeColumnInvisible("ProductId");
            gridView1.AddSummary("MevcutStok");
            gridView1.FormatAsNumber(2, "MevcutStok");

            gridView2.AddSummary();

            gridView1.BestFitColumns();
            gridView2.BestFitColumns();

            gridView1.FocusedRowChanged += new DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventHandler(gridView1_FocusedRowChanged);
            splitContainerControl1.AutoSize();
        }


        void gridView1_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e)
        {
            txtInfo.Caption = gridView1.GetFocusedRowCellDisplayText("ProductId");
            //ExpandCollapse(splitContainerControl1, bsLines.Count > 0 ? AcKapa.Expand : AcKapa.Collapse);
        }

    }
}